#include <QGuiApplication>
#include <QQmlApplicationEngine>

#include <QApplication>
#include <QLabel>

#include "kontrast.h"

QLabel *lbl;

int main(int argc, char *argv[])
{
    // QGuiApplication app(argc, argv);
    QApplication app(argc, argv);

    QQmlApplicationEngine engine;
    QObject::connect(
        &engine,
        &QQmlApplicationEngine::objectCreationFailed,
        &app,
        []() { QCoreApplication::exit(-1); },
        Qt::QueuedConnection);
    engine.loadFromModule("Kontrast", "Main");

    auto pkt = engine.singletonInstance<Kontrast*>("Kontrast", "Kontrast");
    // app.installEventFilter(pkt);

    lbl = new QLabel();
    lbl->installEventFilter(pkt);

    return app.exec();
}
